button {
  color: inherit;
  font-family: inherit;
  text-align: left;
  border: 0;
  padding: 0;
  background: 0;
  font-size: inherit;
  
  &.-arrow {
    &:after {
      content: $icon-down-thin;
      font-family: 'icon';
      position: relative;
      line-height: 0;
      transition: transform 0.2s cubic-bezier(0, 1.4, 1, 1);
      margin-left: auto;
      padding: 0 0.25rem;
      margin-right: -0.25rem;
    }

    &.dropdown-trigger:after {
      transform: rotateZ(180deg);
    }
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  font-family: $font-condensed;
  font-size: 1rem;
  padding: 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  color: inherit;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  background-color: var(--theme-buy-base);
  color: var(--theme-buy-color);
  text-decoration: none;

  &__suffix {
    position: relative;
    z-index: 1;
    padding: calc(0.5rem + 1px);
    margin: calc(-0.5rem - 1px) calc(-0.5rem - 1px) calc(-0.5rem - 1px) 0.5rem;
    border-radius: 0 0.25rem 0.25rem 0;

    &:hover {
      background-color: rgba(white, 0.2);
    }
  }
  
  &:focus {
    box-shadow: 0 0 0 6px rgba($green, 0.1);

    &.-text {
      box-shadow: none;
      background: var(--theme-color-o10);
    }
  }

  &:hover {
    background-color: var(--theme-buy-100);
    color: var(--theme-buy-color);

    &.-text {
      color: var(--theme-color-base);
    }
  }

  &:active {
    transform: translateY(1px);
  }

  &.-block {
    width: 100%;
  }

  &.-small {
    font-size: 0.875rem;
    padding: 0.375rem;
  }

  &.-large {
    font-size: 1.125rem;
  }

  &.-outline {
    background: 0;
    color: var(--theme-color-base);
  }

  &[disabled] {
    pointer-events: none;
    opacity: 0.5;
  }

  &.-cases {
    text-transform: none;
  }

  &.-icon {
    width: 2rem;
    height: 2rem;
    text-align: center;
  }

  &.-red {
    background-color: var(--theme-sell-50);
    border: 1px solid var(--theme-sell-100);
    color: var(--theme-sell-color);

    &.-text {
      color: var(--theme-sell-100);
    }

    &.-outline {
      color: var(--theme-sell-base);
      background: 0;

      &:hover {
        color: var(--theme-sell-color);
        border-color: var(--theme-sell-100);
      }
    }

    &:hover {
      background-color: var(--theme-sell-100);
      border-color: var(--theme-sell-200);

      &.-text {
        background: 0;
        color: var(--theme-sell-100);
        border-color: transparent;
      }
    }
  }

  &.-blue {
    color: white;
    background-color: $blue;
    border: 1px solid $blue;

    &.-text {
      color: $blue;

      &:focus {
        background-color: rgba($blue, 0.2);
      }
    }

    &.-outline {
      color: $blue;
      background: 0;

      &:hover {
        color: white;
        border-color: lighten($blue, 10%);
      }
    }

    &:hover {
      background-color: lighten($blue, 10%);
      border-color: lighten($blue, 10%);

      &.-text {
        background: 0;
        color: lighten($blue, 10%);
        border-color: transparent;
      }
    }
  }

  &.-theme {
    background-color: var(--theme-background-200);
    border: 1px solid var(--theme-background-300);
    color: var(--theme-color-base);

    &.-text {
      color: var(--theme-color-base);
    }

    &.-outline {
      color: var(--theme-color-200);
      background: 0;

      &:hover {
        color: var(--theme-color-base);
        border-color: var(--theme-color-base);
      }
    }

    &:hover {
      background-color: var(--theme-background-300);
      border-color: var(--theme-color-200);

      &.-text {
        background: 0;
        color: var(--theme-color-200);
        border-color: transparent;
      }
    }
  }
  
  &.-green {
    background-color: var(--theme-buy-50);
    border: 1px solid var(--theme-buy-100);
    color: var(--theme-buy-color);

    &.-text {
      color: var(--theme-buy-100);
    }

    &.-outline {
      color: var(--theme-buy-base);
      background: 0;

      &:hover {
        color: var(--theme-buy-color);
        border-color: var(--theme-buy-100);
      }
    }

    &:hover {
      background-color: var(--theme-buy-base);
      border-color: var(--theme-buy-200);

      &.-text {
        background: 0;
        color: var(--theme-buy-200);
        border-color: transparent;
      }
    }
  }

  &.-text {
    background-color: transparent;
    border: transparent 1px solid;
    color: var(--theme-color-base);
  }

  &.-file {
    position: relative;

    input[type='file'] {
      opacity: 0;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      cursor: pointer;
      width: 100%;
      height: 100%;
    }
  }

  &.-pill {
    position: relative;

    .badge {
      top: -0.25rem;
      right: -0.25rem;
      position: absolute;
      z-index: 1;
      font-size: 0.875rem;

      + span {
        padding-right: 0.5rem;
      }
    }

    &.-small .badge + span {
      padding-right: 0.25rem;
    }
  }
}

a {
  color: currentColor;
  text-decoration: underline;

  &:hover,
  &:focus {
    color: currentColor;
  }

  &.-text {
    text-decoration: none;
  }
}

.btn-group {
  > .btn {
    border-radius: 0;
    border-color: transparent;
    margin: 0;

    &:hover {
      border-color: transparent;
    }

    &:not(:first-child) {
      padding-left: 0.25rem;

      &.-small {
        padding-left: 0.25rem;
      }
    }

    &:not(:last-child) {
      padding-right: 0.25rem;

      &.-small {
        padding-right: 0.25rem;
      }
    }

    &:last-child:not(:first-child) {
      padding-left: 0.25rem;
    }
  }

  .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
  }

  .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
  }
}
